#pragma once


#include "LightAbstractRenderer.h"
#include <glm/glm.hpp>

using namespace LightPlayer;

class Renderer : public LightAbstractRenderer
{
public:
	Renderer();
	virtual ~Renderer() {};

		// render method
	virtual void pushMatrix( const MATRIX& transform );
	virtual void DrawLine( const vec2& origin, const vec2& destination ){};
	virtual void DrawQuadBezier(const vec2& origin, const vec2& control, const vec2& destination, uint32 segments){};
	virtual void DrawPoint( const vec2& point ){};
	virtual void DrawSolidTris( const array<vec2>& Tris ){};
	virtual void DrawSolidTrisTextured( const array<vec2>& Tris, const array<vec2>& UVs, uint32 texture ){};
	virtual void DrawSolidTrisGradient( const array<vec2>& Tris, const array<vec2>& UVs, const GRADIENT& Gradient ){};
	virtual void popMatrix();

	// mask 
	virtual void PushMask_Start(){};
	virtual void PushMask_End(){};
	virtual void PopMask_Start(){};
	virtual void PopMask_End(){};

	virtual void setCurrentColor(float r, float g, float b, float a){};
	virtual void setPointSize( float pointSize ){};

	virtual void pushCXFORM(const CXFORM& new_cxform, bool use_stack_transform = true){};
	virtual void popCXFORM(){};

	// registration method
	virtual uint32 createTextureFromRowData( uint8* _rowData, uint32 width, uint32 height ){ return 0; };

private:

#define MATRIX_STACK_SIZE 50
	glm::mat4 m_matrixStack[MATRIX_STACK_SIZE];
	uint8	  m_matrixStackIndex;
};
